Optimal. Leaf size=208 \[ -\frac {\left (15 a^2+21 a b+8 b^2\right ) \log (1-\sin (c+d x))}{16 (a+b)^3 d}+\frac {\left (15 a^2-21 a b+8 b^2\right ) \log (1+\sin (c+d x))}{16 (a-b)^3 d}-\frac {a^6 \log (a+b \sin (c+d x))}{b \left (a^2-b^2\right )^3 d}-\frac {\sec ^4(c+d x) (b-a \sin (c+d x))}{4 \left (a^2-b^2\right ) d}+\frac {\sec ^2(c+d x) \left (4 b \left (3 a^2-2 b^2\right )-a \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 208, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2916, 12, 1661,
1643} \begin {gather*} -\frac {\left (15 a^2+21 a b+8 b^2\right ) \log (1-\sin (c+d x))}{16 d (a+b)^3}+\frac {\left (15 a^2-21 a b+8 b^2\right ) \log (\sin (c+d x)+1)}{16 d (a-b)^3}-\frac {\sec ^4(c+d x) (b-a \sin (c+d x))}{4 d \left (a^2-b^2\right )}+\frac {\sec ^2(c+d x) \left (4 b \left (3 a^2-2 b^2\right )-a \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 d \left (a^2-b^2\right )^2}-\frac {a^6 \log (a+b \sin (c+d x))}{b d \left (a^2-b^2\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1643
Rule 1661
Rule 2916
Rubi steps
\begin {align*} \int \frac {\sin (c+d x) \tan ^5(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {b^5 \text {Subst}\left (\int \frac {x^6}{b^6 (a+x) \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {x^6}{(a+x) \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=-\frac {\sec ^4(c+d x) \left (\frac {b}{a^2-b^2}-\frac {a \sin (c+d x)}{a^2-b^2}\right )}{4 d}+\frac {\text {Subst}\left (\int \frac {-\frac {a^2 b^6}{a^2-b^2}+\frac {3 a b^6 x}{a^2-b^2}-4 b^4 x^2-4 b^2 x^4}{(a+x) \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 b^3 d}\\ &=\frac {\sec ^2(c+d x) \left (4 b \left (3 a^2-2 b^2\right )-a \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}-\frac {\sec ^4(c+d x) \left (\frac {b}{a^2-b^2}-\frac {a \sin (c+d x)}{a^2-b^2}\right )}{4 d}+\frac {\text {Subst}\left (\int \frac {\frac {a^2 b^6 \left (7 a^2-3 b^2\right )}{\left (a^2-b^2\right )^2}-\frac {a b^6 \left (9 a^2-5 b^2\right ) x}{\left (a^2-b^2\right )^2}+8 b^4 x^2}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{8 b^5 d}\\ &=\frac {\sec ^2(c+d x) \left (4 b \left (3 a^2-2 b^2\right )-a \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}-\frac {\sec ^4(c+d x) \left (\frac {b}{a^2-b^2}-\frac {a \sin (c+d x)}{a^2-b^2}\right )}{4 d}+\frac {\text {Subst}\left (\int \left (\frac {b^5 \left (15 a^2+21 a b+8 b^2\right )}{2 (a+b)^3 (b-x)}-\frac {8 a^6 b^4}{(a-b)^3 (a+b)^3 (a+x)}+\frac {b^5 \left (15 a^2-21 a b+8 b^2\right )}{2 (a-b)^3 (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{8 b^5 d}\\ &=-\frac {\left (15 a^2+21 a b+8 b^2\right ) \log (1-\sin (c+d x))}{16 (a+b)^3 d}+\frac {\left (15 a^2-21 a b+8 b^2\right ) \log (1+\sin (c+d x))}{16 (a-b)^3 d}-\frac {a^6 \log (a+b \sin (c+d x))}{b \left (a^2-b^2\right )^3 d}+\frac {\sec ^2(c+d x) \left (4 b \left (3 a^2-2 b^2\right )-a \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}-\frac {\sec ^4(c+d x) \left (\frac {b}{a^2-b^2}-\frac {a \sin (c+d x)}{a^2-b^2}\right )}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.13, size = 187, normalized size = 0.90 \begin {gather*} \frac {-\frac {\left (15 a^2+21 a b+8 b^2\right ) \log (1-\sin (c+d x))}{(a+b)^3}+\frac {\left (15 a^2-21 a b+8 b^2\right ) \log (1+\sin (c+d x))}{(a-b)^3}-\frac {16 a^6 \log (a+b \sin (c+d x))}{(a-b)^3 b (a+b)^3}+\frac {1}{(a+b) (-1+\sin (c+d x))^2}+\frac {9 a+7 b}{(a+b)^2 (-1+\sin (c+d x))}-\frac {1}{(a-b) (1+\sin (c+d x))^2}+\frac {9 a-7 b}{(a-b)^2 (1+\sin (c+d x))}}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.60, size = 193, normalized size = 0.93 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 289, normalized size = 1.39 \begin {gather*} -\frac {\frac {16 \, a^{6} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} - \frac {{\left (15 \, a^{2} - 21 \, a b + 8 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac {{\left (15 \, a^{2} + 21 \, a b + 8 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left ({\left (9 \, a^{3} - 5 \, a b^{2}\right )} \sin \left (d x + c\right )^{3} + 10 \, a^{2} b - 6 \, b^{3} - 4 \, {\left (3 \, a^{2} b - 2 \, b^{3}\right )} \sin \left (d x + c\right )^{2} - {\left (7 \, a^{3} - 3 \, a b^{2}\right )} \sin \left (d x + c\right )\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{4} + a^{4} - 2 \, a^{2} b^{2} + b^{4} - 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.60, size = 303, normalized size = 1.46 \begin {gather*} -\frac {16 \, a^{6} \cos \left (d x + c\right )^{4} \log \left (b \sin \left (d x + c\right ) + a\right ) + 4 \, a^{4} b^{2} - 8 \, a^{2} b^{4} + 4 \, b^{6} - {\left (15 \, a^{5} b + 24 \, a^{4} b^{2} - 10 \, a^{3} b^{3} - 24 \, a^{2} b^{4} + 3 \, a b^{5} + 8 \, b^{6}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (15 \, a^{5} b - 24 \, a^{4} b^{2} - 10 \, a^{3} b^{3} + 24 \, a^{2} b^{4} + 3 \, a b^{5} - 8 \, b^{6}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 8 \, {\left (3 \, a^{4} b^{2} - 5 \, a^{2} b^{4} + 2 \, b^{6}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (2 \, a^{5} b - 4 \, a^{3} b^{3} + 2 \, a b^{5} - {\left (9 \, a^{5} b - 14 \, a^{3} b^{3} + 5 \, a b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, {\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.54, size = 371, normalized size = 1.78 \begin {gather*} -\frac {\frac {16 \, a^{6} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} - \frac {{\left (15 \, a^{2} - 21 \, a b + 8 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac {{\left (15 \, a^{2} + 21 \, a b + 8 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {2 \, {\left (18 \, a^{4} b \sin \left (d x + c\right )^{4} - 18 \, a^{2} b^{3} \sin \left (d x + c\right )^{4} + 6 \, b^{5} \sin \left (d x + c\right )^{4} - 9 \, a^{5} \sin \left (d x + c\right )^{3} + 14 \, a^{3} b^{2} \sin \left (d x + c\right )^{3} - 5 \, a b^{4} \sin \left (d x + c\right )^{3} - 24 \, a^{4} b \sin \left (d x + c\right )^{2} + 16 \, a^{2} b^{3} \sin \left (d x + c\right )^{2} - 4 \, b^{5} \sin \left (d x + c\right )^{2} + 7 \, a^{5} \sin \left (d x + c\right ) - 10 \, a^{3} b^{2} \sin \left (d x + c\right ) + 3 \, a b^{4} \sin \left (d x + c\right ) + 8 \, a^{4} b - 2 \, a^{2} b^{3}\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} {\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.38, size = 549, normalized size = 2.64 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (\frac {b^2}{4\,{\left (a-b\right )}^3}+\frac {9\,b}{8\,{\left (a-b\right )}^2}+\frac {15}{8\,\left (a-b\right )}\right )}{d}-\frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (11\,a\,b^2-15\,a^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (3\,a\,b^2-7\,a^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (11\,a\,b^2-15\,a^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2\,b-b^3\right )}{a^4-2\,a^2\,b^2+b^4}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (3\,a^2\,b-2\,b^3\right )}{a^4-2\,a^2\,b^2+b^4}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (2\,a^2\,b-b^3\right )}{a^4-2\,a^2\,b^2+b^4}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (7\,a^2-3\,b^2\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{b\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (\frac {15}{8\,\left (a+b\right )}-\frac {9\,b}{8\,{\left (a+b\right )}^2}+\frac {b^2}{4\,{\left (a+b\right )}^3}\right )}{d}-\frac {a^6\,\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{d\,\left (a^6\,b-3\,a^4\,b^3+3\,a^2\,b^5-b^7\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________